package com.atguigu.tingshu.account.service;

import com.atguigu.tingshu.model.account.UserAccount;
import com.atguigu.tingshu.vo.account.AccountLockResultVo;
import com.atguigu.tingshu.vo.account.AccountLockVo;
import com.baomidou.mybatisplus.extension.service.IService;

import java.math.BigDecimal;

public interface UserAccountService extends IService<UserAccount> {


    void initUserAccount(Long userId);

    BigDecimal getAvailableAmount();

    AccountLockResultVo checkAndLockAccount(AccountLockVo accountLockVo);

    void deductionAmount(String orderNo);

    int unlockAccount(Long userId, BigDecimal amount);

    void refund(String orderNo);
}
